package com.jier.vo.admin;

import com.jier.dto.SystemRolePermissionResultDto;

/**
 * 系统角色权限视图
 *
 * @author jie_r
 * @date 2018/03/18
 */
public class SystemRolePermissionVo {
    /**
     * 名称
     */
    private String id;
    /**
     * 名称
     */
    private String name;

    /**
     * 模块ID
     */
    private Integer moduleId;

    /**
     * 次序
     */
    private Integer sortOrder;

    /**
     * 权限状态，false 没有权限， true 有权限
     */
    private Boolean permission;

    public SystemRolePermissionVo(SystemRolePermissionResultDto systemRolePermission) {
        if (systemRolePermission != null) {
            this.id = systemRolePermission.getId();
            this.name = systemRolePermission.getName();
            this.moduleId = systemRolePermission.getModuleId();
            this.sortOrder = systemRolePermission.getSortOrder();
            this.permission = systemRolePermission.getPermission();
        }
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getModuleId() {
        return moduleId;
    }

    public void setModuleId(Integer moduleId) {
        this.moduleId = moduleId;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    public Boolean getPermission() {
        return permission;
    }

    public void setPermission(Boolean permission) {
        this.permission = permission;
    }
}
